#!/usr/bin/ruby
# -*- ruby -*-
#
# http://codeforces.com/problemset/problem/399/A

require 'pp'

n, p, k = ARGV.map(&:to_i)

page_range = (p - k .. p + k)

pp page_range.to_a

nav = []

nav << "<<" if (p - k) > 1

page_range.to_a.select { |page| 1 <= page && page <= n }.each do |page|
  page = "(#{page})" if page == p

  nav << page.to_s
end

nav << ">>" if (p + k) < n

puts nav.join(" ")
